Added differentiability of the max function#1819
Added differentiability of the max function#1819affeldt-aist merged 14 commits intomath-comp:masterfrom
Conversation
41a8000 to
2638f48
Compare
|
Thanks for the contribution. |
|
Hello, Thank you for you help. Fact der_max f g x v :
f x <> g x -> derivable f x v -> derivable g x v ->
(fun h => h^-1 *: (((f \max g) \o shift x) (h *: v) - (f \max g) x)) @
0^' --> if f x < g x then 'D_v g x else 'D_v f x.So that its more general and fits with the library more. Should I redraft this pr or make a new one with an update from this format to the newer better one? |
|
Sorry I made a mistake and merged the wrong branch, should be fixed now. A few helpful lemmas were added to |
|
Its worth noting that the removal of the dependence on |
889f0c1 to
98d8d73
Compare
|
Before all, sincere apologies for the slow reactivity, February has been busy.
No harm!
Indeed, but this is a strict generalization, so dependencies that will break will be easily fixed and to the benefit of the user. The "Generalized" entry of the changelog should be appropriate to document these changes. I have updated the changelog and also made a linting pass on the code (a bit of shortening and formatting to abide by the contributing guide https://github.com/math-comp/math-comp/blob/master/CONTRIBUTING.md). I think that we need to take another look at the naming of lemmas before merging. |
CohenCyril
left a comment
There was a problem hiding this comment.
Except for the der_max thing, I think this is ready.
Later on, one should add is_derive instances to enable automated inference.
|
Should not we state these properties in terms of Not directly a comment to this PR itself, but |
I don't have an answer (except maybe a comment: I have difficulties to remember which of | and & corresponds to max ^_^) but I recorded these issues as issue #1896 and issue #1897 |
Added a lemma for showing \max is differentiable Added two lemmas for differentiating the max function when the order is known at the point.
c154352 to
e12c2ec
Compare
|
It might look like I bypassed the rules but the requested change has actually been addressed. |
Added a lemma for showing \max is differentiable
Added two lemmas for differentiating the max function when the order is known at the point.
Motivation for this change
Differentiability of max can be useful and is general enough it should be added to the library.
Checklist
CHANGELOG_UNRELEASED.mdReference: How to document
Merge policy
As a rule of thumb:
all compile are preferentially merged into master.
Reminder to reviewers